package com.zjhb.common.enumutil;

public enum Asets {
	Use("1", "使用中"),
	Delete("2", "已删除"),
	lose("0", "报废");

	private String key;
	private String value;

	private Asets(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static Asets parse(String key) {
		Asets [] areas=Asets.values();
		for(Asets a:areas){
			if(a.getKey().equals(key)){
				return a;
			}
		}
        return null;
	}

	public static Asets parseValue(String value) {
		Asets [] areas=Asets.values();
		for(Asets a:areas){
			if(a.getValue().equals(value)){
				return a;
			}
		}
        return null;
	}



}
